package com.demo.client.test;

import java.util.ArrayList;
import java.util.List;

public class SendMsg implements Sender{

    private static final List<User> users = new ArrayList<>();
    @Override
    public void sendNotice(String msg) {
        users.forEach(e->{
            e.noticeInfo(e.getName() + " !!!" + msg + "涨工资了");
        });
    }

    @Override
    public void addUser(User user) {
        users.add(user);
    }
}
